package com.iplant.wms.service.po.bill;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 销售发货单明细
 */
@DBBasePO(TableName = "wms_salesdeliveryitem", Name = false, Active = false,
        CheckName = {"Code"}, Schemas = DBSchemas.WMS, CodeAuto = true,
        CodePrefix = "SDGI{yyMM}-")
public class WMSSalesDeliveryItem extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;


    @DBCondition
    @DBField(Update = false)
    public int FactoryID = 0;

    @DBJoin(name = "Code", tableName = "fmc_factory", tableAsName = "f1",
            Schemas = DBSchemas.Basic, MainTableField = "FactoryID")
    public String FactoryCode = "";

    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "f1",
            Schemas = DBSchemas.Basic, MainTableField = "FactoryID")
    public String FactoryName = "";


    /**
     * 发货单ID
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.in)
    @DBField
    public int SalesDeliveryID = 0;
    /**
     * 发货单号
     */
    @DBJoin(name = "Name", tableName = "wms_salesdelivery", JoinMode = DBJoin.DBJoinMode.Inner,
            tableAsName = "sd1", Schemas = DBSchemas.WMS, MainTableField =
            "SalesDeliveryID")
    public String SalesDeliveryCode = "";
    /**
     * 物料ID
     */
    @DBCondition
    @DBField
    public int MaterialID = 0;
    /**
     * 物料编号
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "mss_material", tableAsName = "m2",
            JoinMode = DBJoin.DBJoinMode.Inner,
            Schemas = DBSchemas.Basic, MainTableField = "MaterialID")
    public String MaterialNo = "";
    /**
     * 物料名称
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "mss_material", tableAsName = "m2",
            JoinMode = DBJoin.DBJoinMode.Inner,
            Schemas = DBSchemas.Basic, MainTableField = "MaterialID")
    public String MaterialName = "";
    /**
     * 计划发货物料数量
     */
    @DBField
    public double FQTY = 0.0;
    /**
     * 实际分拣数量
     */
    @DBField
    public double RealOutFQTY = 0.0;

    /**
     * 包装容量
     */
    @DBField
    public double PackageCapacity = 0.0;
    /**
     * 包装方式
     */
    @DBField
    public String Packing = "";
    /**
     * 辅计量单位ID
     */
    @DBField
    public int UnitID = 0;
    /**
     * 辅计量单位
     */
    @DBField
    public String UnitText = "";
    /**
     * 换算率
     */
    @DBField
    public double ConversionRate = 0.0;
    /**
     * 状态
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.in)
    @DBField
    public int Status = 0;
    /**
     * 状态文本
     */
    public String StatusText = "";


    /**
     * 发货(退货)单子表ID
     */
    @DBField
    public int U8_BillItemID = 0;

    /**
     * 发货退货单主表ID
     */
    @DBField
    public int U8_BillID = 0;


    @DBCondition
    @DBField
    public int StoreID = 0;

    @DBJoin(name = "Name", tableName = "wms_store", tableAsName = "st4",
            JoinMode = DBJoin.DBJoinMode.Left,
            Schemas = DBSchemas.WMS, MainTableField = "StoreID")
    public String StoreName = "";
    @DBJoin(name = "Code", tableName = "wms_store", tableAsName = "st4",
            JoinMode = DBJoin.DBJoinMode.Left,
            Schemas = DBSchemas.WMS, MainTableField = "StoreID")
    public String StoreCode = "";

    /**
     * 销售单ID
     */
    @DBCondition
    @DBField
    public int PurchaseOrderID = 0;
    /**
     * 销售单号
     */
    @DBCondition
    @DBField
    public String PurchaseOrderCode = "";


    /**
     *  销售订单子项ID
     */
    @DBCondition
    @DBField
    public int PurchaseOrderItemID = 0;
    /**
     * 销售单子项号
     */
    @DBCondition
    @DBField
    public String PurchaseOrderItemCode = "";


    /**
     * U8 销售订单子表ID
     */
    @DBField
    public int U8_UAItemID = 0;

    /**
     * 销售订单行号(字段类型依据：U8数据字典文件的DispatchLists Table (SA 销售管理) [U861])
     */
    @DBField
    public int U8_UAItemRowNo = 1;

    /**
     * 项目大类编码
     */
    @DBField
    public String cItem_class = "";

    /**
     * 项目大类名称
     */
    @DBField
    public String cItem_name = "";

    /**
     * 项目编码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like,ParamName2 = "ProjectNoEQ")
    @DBField
    public String ProjectNo = "";

    /**
     * 项目名称
     */
    @DBField
    public String ProjectName = "";


    @JsonProperty("SalesDeliveryID")
    public int getSalesDeliveryID() {
        return SalesDeliveryID;
    }

    public void setSalesDeliveryID(int salesDeliveryID) {
        SalesDeliveryID = salesDeliveryID;
    }

    @JsonProperty("SalesDeliveryCode")
    public String getSalesDeliveryCode() {
        return SalesDeliveryCode;
    }

    public void setSalesDeliveryCode(String salesDeliveryCode) {
        SalesDeliveryCode = salesDeliveryCode;
    }

    @JsonProperty("MaterialID")
    public int getMaterialID() {
        return MaterialID;
    }

    public void setMaterialID(int materialID) {
        MaterialID = materialID;
    }

    @JsonProperty("MaterialNo")
    public String getMaterialNo() {
        return MaterialNo;
    }

    public void setMaterialNo(String materialNo) {
        MaterialNo = materialNo;
    }

    @JsonProperty("MaterialName")
    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String materialName) {
        MaterialName = materialName;
    }

    @JsonProperty("FQTY")
    public double getFQTY() {
        return FQTY;
    }

    public void setFQTY(double FQTY) {
        this.FQTY = FQTY;
    }

    @JsonProperty("RealOutFQTY")
    public double getRealOutFQTY() {
        return RealOutFQTY;
    }

    public void setRealOutFQTY(double realOutFQTY) {
        RealOutFQTY = realOutFQTY;
    }


    @JsonProperty("PackageCapacity")
    public double getPackageCapacity() {
        return PackageCapacity;
    }

    public void setPackageCapacity(double packageCapacity) {
        PackageCapacity = packageCapacity;
    }

    @JsonProperty("Packing")
    public String getPacking() {
        return Packing;
    }

    public void setPacking(String packing) {
        Packing = packing;
    }

    @JsonProperty("UnitID")
    public int getUnitID() {
        return UnitID;
    }

    public void setUnitID(int unitID) {
        UnitID = unitID;
    }

    @JsonProperty("UnitText")
    public String getUnitText() {
        return UnitText;
    }

    public void setUnitText(String unitText) {
        UnitText = unitText;
    }

    @JsonProperty("ConversionRate")
    public double getConversionRate() {
        return ConversionRate;
    }

    public void setConversionRate(double conversionRate) {
        ConversionRate = conversionRate;
    }

    @JsonProperty("Status")
    public int getStatus() {
        return Status;
    }

    public void setStatus(int status) {
        Status = status;
    }

    @JsonProperty("StatusText")
    public String getStatusText() {
        return StatusText;
    }

    public void setStatusText(String statusText) {
        StatusText = statusText;
    }

    @JsonProperty("iDLsID")
    public int getU8_BillItemID() {
        return U8_BillItemID;
    }

    public void setU8_BillItemID(int u8_BillItemID) {
        this.U8_BillItemID = u8_BillItemID;
    }

    @JsonProperty("DLID")
    public int getU8_BillID() {
        return U8_BillID;
    }

    public void setU8_BillID(int u8_BillID) {
        this.U8_BillID = u8_BillID;
    }

    @JsonProperty("StoreID")
    public int getStoreID() {
        return StoreID;
    }

    public void setStoreID(int storeID) {
        StoreID = storeID;
    }

    @JsonProperty("StoreName")
    public String getStoreName() {
        return StoreName;
    }

    public void setStoreName(String storeName) {
        StoreName = storeName;
    }

    @JsonProperty("StoreCode")
    public String getStoreCode() {
        return StoreCode;
    }

    public void setStoreCode(String storeCode) {
        StoreCode = storeCode;
    }

    @JsonProperty("PurchaseOrderID")
    public int getPurchaseOrderID() {
        return PurchaseOrderID;
    }

    public void setPurchaseOrderID(int purchaseOrderID) {
        PurchaseOrderID = purchaseOrderID;
    }

    @JsonProperty("PurchaseOrderCode")
    public String getPurchaseOrderCode() {
        return PurchaseOrderCode;
    }

    public void setPurchaseOrderCode(String purchaseOrderCode) {
        PurchaseOrderCode = purchaseOrderCode;
    }

    @JsonProperty("PurchaseOrderItemID")
    public int getPurchaseOrderItemID() {
        return PurchaseOrderItemID;
    }

    public void setPurchaseOrderItemID(int purchaseOrderItemID) {
        PurchaseOrderItemID = purchaseOrderItemID;
    }

    @JsonProperty("PurchaseOrderItemCode")
    public String getPurchaseOrderItemCode() {
        return PurchaseOrderItemCode;
    }

    public void setPurchaseOrderItemCode(String purchaseOrderItemCode) {
        PurchaseOrderItemCode = purchaseOrderItemCode;
    }

    @JsonProperty("U8_UAItemID")
    public int getU8_UAItemID() {
        return U8_UAItemID;
    }

    public void setU8_UAItemID(int u8_UAItemID) {
        U8_UAItemID = u8_UAItemID;
    }

    @JsonProperty("U8_UAItemRowNo")
    public int getU8_UAItemRowNo() {
        return U8_UAItemRowNo;
    }

    public void setU8_UAItemRowNo(int u8_UAItemRowNo) {
        U8_UAItemRowNo = u8_UAItemRowNo;
    }

    @JsonProperty("cItem_class")
    public String getcItem_class() {
        return cItem_class;
    }

    public void setcItem_class(String cItem_class) {
        this.cItem_class = cItem_class;
    }

    @JsonProperty("cItem_CName")
    public String getcItem_name() {
        return cItem_name;
    }

    public void setcItem_name(String cItem_name) {
        this.cItem_name = cItem_name;
    }

    @JsonProperty("cItemCode")
    public String getProjectNo() {
        return ProjectNo;
    }

    public void setProjectNo(String projectNo) {
        this.ProjectNo = projectNo;
    }

    @JsonProperty("cItemName")
    public String getProjectName() {
        return ProjectName;
    }

    public void setProjectName(String projectName) {
        this.ProjectName = projectName;
    }

    @JsonProperty("FactoryID")
    public int getFactoryID() {
        return FactoryID;
    }

    public void setFactoryID(int factoryID) {
        FactoryID = factoryID;
    }

    @JsonProperty("FactoryCode")
    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    @JsonProperty("FactoryName")
    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

}
